srcs := $(wildcard raw/*.txt)
objects := $(patsubst raw/%.txt, in/%.txt, ${srcs})

train_obj := $(patsubst raw/%.txt, train/%.txt, ${srcs})
#test_obj :=  $(patsubst raw/%.txt, test/%.txt, ${srcs})



in/%.txt : raw/%.txt
	perl parse_data.pl $< $@

train/%.txt: raw/%.txt
	perl test_data.pl $< $(patsubst train/%.txt, test/%.txt, $@) $@ $(patsubst train/%.txt, test/label-%.txt, $@)


all:${objects} ${train_obj}

clean:
	-rm -rf in/*.*
	-rm -rf test/*.*
	-rm -rf train/*.*
